﻿using System;

namespace RaGE_JD
{
    internal class Offset : Object
    {
        public int[] BaseChain;
        public string Version;
        public int DirX;
        public int DirY;
        public int DirZ;
        public int PosX;
        public int PosY;
        public int PosZ;
    }

    internal class Trigger : Object
    {
        public int unknown_1;
        public int unknown_2;
        public byte[] name;
        public bool unknown_3;
        public int unknown_4;
        public int unknown_5;
        public bool unknown_6;
        public bool unknown_7;
        public int year_1;
        public int month_1;
        public int week_day_1;
        public int day_1;
        public int hour_1;
        public int minute_1;
        public int year_2;
        public int month_2;
        public int week_day_2;
        public int day_2;
        public int hour_2;
        public int minute_2;
        public int duration;
        public bool forced_stop;
    }

    internal class Dynamic : Object
    {
        public int id;
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public byte unknown_5;
        public byte unknown_6;
        public byte unknown_7;
        public byte unknown_8;
        public int trigger;
    }

    internal class ResourceGroup : Object
    {
        public int unknown_1;
        public int id;
        public int respawn;
        public int amount;
        public int unknown_2;
    }

    internal class ResourceSets : Object
    {
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public float spread_x;
        public float spread_z;
        public int resource_groups_count;
        public bool unknown_1;
        public bool unknown_2;
        public bool unknown_3;
        public int unknown_4;
        public byte unknown_5;
        public byte unknown_6;
        public byte unknown_7;
        public int unknown_trigger;
        public int unknown_8;
        public int unknown_index;
        public int unknown_mutual;
        public ResourceGroup[] resource_groups;
        public int[] mutualExclusionGroup;
    }

    internal class CreatureGroup : Object
    {
        public int id;
        public int amount;
        public int respawn;
        public int unknown_2;
        public int unknown_3;
        public int unknown_4;
        public int unknown_5;
        public int unknown_6;
        public int unknown_7;
        public int unknown_8;
        public bool unknown_9;
        public bool unknown_10;
        public bool unknown_11;
        public bool unknown_12;
        public int unknown_13;
        public int unknown_14;
        public int unknown_15;
        public int unknown_16;
    }

    internal class CreatureSets : Object
    {
        public int spawn_mode;
        public int creature_groups_count;
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public float rot_1;
        public float rot_2;
        public float rot_3;
        public float spread_x;
        public float spread_alt;
        public float spread_z;
        public int unknown_7;
        public int unknown_8;
        public bool unknown_9;
        public bool unknown_10;
        public bool unknown_11;
        public int unknown_12;
        public int trigger;
        public int unknown_14;
        public int unknown_15;
        public int unknown_16;
        public int unknown_17;
        public CreatureGroup[] creature_groups;
        public int[] mutualExclusionGroup;
    }

    internal class NPCGen : Object
    {
        public int version;
        public int creature_sets_count;
        public int resource_sets_count;
        public int dynamics_count;
        public int triggers_count;

        public CreatureSets[] creature_sets;
        public ResourceSets[] resource_sets;
        public Dynamic[] dynamics;
        public Trigger[] triggers;
    }
}
